<?php
session_start();
require_once( 'configs/config.php' );
require_once(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty();

if( (isset( $_SESSION[ 'UID' ] ) && $_GET[ 'id' ] == $_SESSION[ 'UID' ] ) || $_SESSION[ 'Level' ] == $config[ 'Admin' ] )
{
	$smarty->assign('logged_in', 'true');
	$smarty->assign('admin', 'true');
	$smarty->assign('self', 'true');
	header('Location: account.php');
	exit; // Making sure nothing happens next;
}

$smarty->assign('title', 'Log Into Your Account');
$smarty->assign('form', 'loginProcess.php');
$smarty->display('login.tpl');
?>
